package cn.tedu.csmall.product.mapper;

import cn.tedu.csmall.product.pojo.entity.Attribute;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class AttributeMapperTets {
   @Autowired
  AttributeMApper  mapper;
   @Test
    void testInsert(){
      Attribute attribute=new Attribute();
      attribute.setName("手机壳");
      attribute.setValueList("黑色,白色,蓝色");
      attribute.setUnit("英寸");
      attribute.setType(0);
      int row=mapper.insert(attribute);
      System.out.println("row = "+row);
   }
   @Test
   void testdeleteById(){
      Long id=11L;
      int row= mapper.deleteById(id);
      System.out.println("row = "+row);
   }

}
